/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


function Validar() {
    $('#FormUser').validate({
//regras e mensagens para os campos
        rules: {
            txtName: {required: true, minlength: 3},
            txtEmail: {required: true, email: true},
            txtPassword: {required: true,minlength: 6}
        },
        messages: {
            txtName: {required: 'Preencha o campo nome', minlength: 'No mínimo 3 letras'},
            txtEmail: {required: 'Informe o seu email', email: 'Ops, informe um email válido'},
            txtPassword: {required: 'Informe uma senha',minlength: 'A senha deve conter no minimo 6 caracteres'}

        },
         errorLabelContainer: $('.msg')
    });
};